package unit8.part2;

import javax.swing.*;
import java.awt.*;

public class JButtonAndJLabelTest {
    public static void main(String[] args) {
        JFrame jFrame = new JFrame("测试按钮和标签");
        jFrame.setSize(400, 100);
        jFrame.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));

        jFrame.add(new JLabel("是否要提前下课？"));
        jFrame.add(new JButton("确定"));
        jFrame.add(new JButton("取消"));
        // 按钮添加监听器之后在说

        jFrame.setVisible(true);
    }
}
